package com.hc.model.code03.test4;


/**
 * @version v1.0
 * @ClassName: Client
 * @Description: 测试类
 * @Author: HC
 */
public class Client {

    public static void main(String[] args) {
        // 炒饭
        FastFood fr1 = new FriedRice();
        fr1 = new Egg(fr1);
        fr1.cost();
        System.out.println(fr1.getDesc() + " " + fr1.cost() + "元");

        fr1 = new Bacon(fr1);
        System.out.println(fr1.getDesc() + " " + fr1.cost() + "元");
    }
}
